package com.caltco.cargo.ops.modules.sys.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.caltco.cargo.ops.common.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class ProjectVO extends BaseEntity implements Serializable {
    @Schema(description = "用户Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "项目名称")
    @TableField("project_name")
    @JsonProperty("projectName")
    private String projectName;

    @Schema(description = "项目描述")
    @TableField("description")
    @JsonProperty("description")
    private String description;

    @Schema(description = "项目结束时间")
    @TableField("project_end_time")
    @JsonProperty("projectEndTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime projectEndTime;


    @Schema(description = "项目开始时间")
    @TableField("project_start_time")
    @JsonProperty("projectStartTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime projectStartTime;

    @Schema(description = "项目码")
    @TableField("project_code")
    @JsonProperty("projectCode")
    private String projectCode;


    @Schema(description = "是否收藏")
    @TableField("is_collection")
    @JsonProperty("isCollection")
    private Integer isCollection;

    @Schema(description = "是否置顶")
    @TableField("is_top")
    @JsonProperty("isTop")
    private Integer isTop;

    @Schema(description = "是否创建者")
    @TableField("is_create")
    @JsonProperty("isCreate")
    private Integer isCreate;

    @Schema(description = "创建人")
    @TableField("create_person")
    @JsonProperty("createPerson")
    private String createPerson;
}
